home *** CD-ROM | disk | FTP | other *** search
/ Whiteline: Alpha / Whiteline Alpha.iso / progtool / c / gemforce / gfglobal.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-09-22  |  4.9 KB  |  157 lines

  1. /* GFGLOBAL.H zur GEM-Force-Library */
  2.  
  3. #ifndef __GFGLOBAL__
  4. # define __GFGLOBAL__
  5.  
  6. # include <aes.h>
  7.  
  8. /************************* defines ***********************************/
  9.  
  10. # define NIL (-1)
  11. # define DESK 0
  12. # define RC  2                    /* Raster-Koordinaten */
  13. # define NDC 0                    /* normalisierte Koordinaten */
  14. # define FSMGDOS  0x5F46534D
  15. # define FONTGDOS 0x5F464E54
  16. # define TEDINFO(tree,ind) tree[ind].ob_spec.tedinfo
  17. # define TE_PTEXT(tree,ind) tree[ind].ob_spec.tedinfo->te_ptext
  18.  
  19. # define SQUARED          0 /* line ends */
  20. # define ARROWED          1
  21. # define ROUNDED          2
  22.  
  23. # define FONT_SYSTEM   1                   /* GEM System Font */
  24. # define FONT_SWISS    2                   /* Swiss Font */
  25. # define FONT_DUTCH   14                   /* Dutch Font */
  26.  
  27. # define TXT_NORMAL       0x0000 /* text effects */
  28. # define TXT_THICKENED    0x0001
  29. # define TXT_LIGHT        0x0002
  30. # define TXT_SKEWED       0x0004
  31. # define TXT_UNDERLINED   0x0008
  32. # define TXT_OUTLINED     0x0010
  33. # define TXT_SHADOWED     0x0020
  34.  
  35. # define ALI_LEFT         0 /* horizontal text alignment */
  36. # define ALI_CENTER       1
  37. # define ALI_RIGHT        2
  38.  
  39. # define ALI_BASE         0 /* vertical text alignment */
  40. # define ALI_HALF         1
  41. # define ALI_ASCENT       2
  42. # define ALI_BOTTOM       3
  43. # define ALI_DESCENT      4
  44. # define ALI_TOP          5
  45.  
  46. /************************* types ***********************************/
  47.  
  48. typedef struct
  49. {
  50.     int x, y, w, h;
  51. } RECT;
  52.  
  53. typedef struct
  54. {
  55.     long x, y, w, h;
  56. } LRECT;
  57.  
  58. typedef struct
  59. {
  60.     int     ascii_code;
  61.     int     scan_code;
  62.     BOOLEAN shift;
  63.     BOOLEAN ctrl;
  64.     BOOLEAN alt;
  65.     int     kreturn;
  66.     int     kstate;
  67. } KEYINFO;
  68.  
  69. /************************* globals ***********************************/
  70.  
  71. GLOBAL RECT desk, clip;
  72. GLOBAL int vdi_handle, phys_handle, tos, colors;
  73. GLOBAL int gl_wbox, gl_hbox;            /* Zeichenbox */
  74. GLOBAL int gl_wchar, gl_hchar;        /* Zeichen */
  75. GLOBAL int gl_wattr, gl_hattr;        /* Fensterelemente */
  76. GLOBAL int appl_id;
  77. GLOBAL int blinkrate;
  78. GLOBAL long gdos;
  79. GLOBAL BOOLEAN grow_shrink, save_bg;
  80. GLOBAL int mousenumber;               /* Aktuelle Mausform-Nummer */
  81. GLOBAL MFORM *mouseform;                /* Aktuelle Mausform */
  82.  
  83. /************************* functions *********************************/
  84.  
  85. GLOBAL BOOLEAN init_gem ( void );
  86. GLOBAL void exit_gem ( void );
  87. GLOBAL BOOLEAN rsc_load ( char *, char * );
  88. GLOBAL BOOLEAN init_tree ( int , OBJECT **, BOOLEAN );
  89.  
  90. GLOBAL void call_mortimer ( char * );
  91.  
  92. GLOBAL BOOLEAN select_file ( char *, char *, char *, char *, char * );
  93. GLOBAL void divide_filename ( char *, char *, char * );
  94.  
  95. GLOBAL void dialog_on ( OBJECT * );
  96. GLOBAL int do_dialog ( OBJECT *, int );
  97. GLOBAL int form_dialog ( OBJECT *, int );
  98. GLOBAL void dialog_off ( OBJECT * );
  99.  
  100. GLOBAL void set_mouse ( int, MFORM * );
  101. GLOBAL void last_mouse ( void );
  102. GLOBAL void hide_mouse ( void );
  103. GLOBAL void show_mouse ( void );
  104. GLOBAL void busy_mouse ( void );
  105. GLOBAL void arrow_mouse ( void );
  106.  
  107. GLOBAL void do_state (OBJECT *, int, unsigned int );
  108. GLOBAL void undo_state (OBJECT *, int, unsigned int );
  109. GLOBAL void flip_state (OBJECT *, int, unsigned int  );
  110. GLOBAL int find_state (OBJECT *, int, unsigned int );
  111. GLOBAL BOOLEAN is_state (OBJECT *, int, unsigned int );
  112.  
  113. GLOBAL void do_flags (OBJECT *, int, unsigned int );
  114. GLOBAL void undo_flags (OBJECT *, int, unsigned int );
  115. GLOBAL void flip_flags (OBJECT *, int, unsigned int );
  116. GLOBAL int find_flags (OBJECT *, int, unsigned int );
  117. GLOBAL BOOLEAN is_flags (OBJECT *, int, unsigned int );
  118.  
  119. GLOBAL int find_type (OBJECT *, int, unsigned int );
  120. GLOBAL void set_rbutton  (OBJECT *, int, int, int ); 
  121. GLOBAL int get_rbutton  (OBJECT *, int ); 
  122.  
  123. GLOBAL void text_default ( void );
  124. GLOBAL void line_default ( void );
  125.  
  126. GLOBAL void objc_rect ( OBJECT *, int, RECT *, BOOLEAN );
  127.  
  128. GLOBAL void bell( void );
  129.  
  130. GLOBAL void rect2array ( const RECT *, int * );
  131. GLOBAL void array2rect ( const int *, RECT * );
  132. GLOBAL void xywh2array  ( int, int, int, int, int *);
  133. GLOBAL void array2xywh  ( const int *, int *, int *, int *, int *);
  134. GLOBAL void xywh2rect ( int, int, int, int, RECT * );
  135. GLOBAL void rect2xywh ( const RECT *, int *, int *, int *, int *);
  136. GLOBAL BOOLEAN rc_intersect (const RECT *, RECT * );
  137. GLOBAL BOOLEAN rc_equal ( const RECT *, const RECT * );
  138. GLOBAL void rc_union ( const RECT *, RECT * );
  139. GLOBAL BOOLEAN inside ( int, int, const RECT * );
  140.  
  141. GLOBAL void set_clip ( BOOLEAN, const RECT * );
  142.  
  143. GLOBAL BOOLEAN find_menu_item ( OBJECT *, KEYINFO *, int *, int * );
  144. GLOBAL void get_keyinfo ( int, int, KEYINFO * );
  145.  
  146. GLOBAL void store_dial ( OBJECT * );
  147. GLOBAL void restore_dial ( OBJECT * );
  148.  
  149. GLOBAL void set_te_ptext ( OBJECT *obj, int ind, const char *str );
  150. GLOBAL void deselect_obj ( OBJECT *, int );
  151.  
  152. GLOBAL void draw_grow_shrink ( RECT *, int );
  153.  
  154. GLOBAL int popup_menu ( OBJECT *, int, int, int, int, BOOLEAN, int );
  155.  
  156. #endif /* __GFGLOBAL__ */
  157.